using Gee;

namespace Vwf.Vwt {
	public class BlockMixed : Block {
		public ArrayList<Block> items = new ArrayList<Block>();
		public override string? codeRender() {
			string ret = "";
			foreach(var item in items) {
				string? code = item.codeRender();
				if (code != null) {
					ret += "\t\t\t" + code + "\n";
				};
			};
			
			return ret; 
		}
		public override string? codePreRender() {
			string ret = "";
			foreach(var item in items) {
				string? code = item.codePreRender();
				if (code != null) {
					ret += "\t\t\t" + code + "\n";
				};
			};
			
			return ret; 
		}
		public override string? codeInit() {
			string ret = "";
			foreach(var item in items) {
				string? code = item.codeInit();
				if (code != null) {
					ret += "\t\t\t" + code + "\n";
				};
			};
			
			return ret; 
		}
		public BlockMixed() { }
		public void add(Block item) {
			items.add(item);
		}
	}
}
